<script type="text/javascript" src="<?php echo Yii::app()->theme->baseUrl; ?>/js/jquery-1.6.2.min.js"></script>
<script type="text/javascript">
$(document).ready(function(){
	$('#up_name').focus();
	$('input:visible:first').focus();
	$('input[type="text"], input[type="password"], textarea,  select').blur(function() {
			$('input[type="text"], input[type="password"], textarea,  select').removeClass('focus');
			$(this).addClass('unFocus');
		})
		.focus(function() {
			$(this).addClass('focus');
			$(this).removeClass('unFocus');
		
		});
	
	$(".plus").hide();
	
	$(".user_projMod").hide();
	
	$(".user_project").mouseover(function(){
		
		$(this).children(".user_pname").children(".user_projMod").show();
	});
	
	$(".user_project").mouseout(function(){
		$(".user_projMod").hide();
	});
	
	$(".slideToggle").click(function(){
		if($($(this).parent().parent().children(".user_projinfo")).is(":visible")) {
			$(this).children(".minus").hide();
			$(this).children(".plus").show();
		}
		else {
			$(this).children(".plus").hide();
			$(this).children(".minus").show();
		}
		$(this).parent().parent().children(".user_projinfo").slideToggle("slow");
	});
	

  
});
</script>
<?php 
						  foreach ($OutsideProjectList as $item){
						 ?>
						 	<div class="user_project">
						 	 
							<div class = "user_pname" >
								<span class="slideToggle" >
									<img class="minus" title ="thu gọn" src="<?php echo Html::imageUrl("minus.gif");?>" ></img>
									<img class="plus" title ="mở rộng" src="<?php echo Html::imageUrl("plus.gif");?>" ></img>
								</span>
								<span class = "up_projname">Project:<?php  echo $item->outside_project_name;?> </span> 
								<span class = "up_lang">Ngôn ngữ : 
										<?php 
										$ProgLang = $item->outsideProjectLanguage;
										echo $ProgLang->programming_language_name
										?>
								</span>
								
								<span class ="user_projMod">
								
									
									<?php 

									  echo Chtml::ajaxLink("Delete", $this->createUrl("delete"), 
                                                			array(

                                                				'type'=>'POST',
                                                				'data'=>array('pid'=>$item->outside_project_id,
                                                							   'uid'=>$uid,	
                                                								),
                                                				'beforeSend'=>'function() {
                                                				        return confirm("Are you sure");	
																		$("#show_project").addClass("loading");
																	}',
																	'complete'=>'function(){
																		$("#show_project").removeClass("loading");
																	}',
																	'update'=>"#show_project",
                                                			), 
                                                			array(
                                                				'class'=>'pjDelete',
                                                			)
                                                		);
									?>
								</span>
								
							</div>

							<div class = "user_projinfo">	
								<div class = "user_profile"><span class="user_label" >Mô tả công việc</span>:
								 <?php echo $item->outside_project_assigment_description;?>	</div>
								<div class = "user_profile"><span class ="user_label">Thời gian thực viện</span>:<?php echo $item->outside_project_excution_time;?> tháng </div>
								<div class = "user_profile"><span class="user_label" >Nhân công</span>:	<?php echo $item->outside_project_size;?> người</div>
								<div class = "user_profile"><span class = "user_label">Vị trí</span>:<?php echo $item->outside_project_user_position?></div>
							</div>						
						</div>
						 <?php 	  
						  	
						  }	//end print list outside project
						
						?>


						</div>

